package com.cinc.ebc.mm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 采购订单明细
 * @Author: jeecg-boot
 * @Date:   2022-03-20
 * @Version: V1.0
 */
@ApiModel(value="mm_purchase_order_detail对象", description="采购订单明细")
@Data
public class MmPurchaseOrderDetailModel implements Serializable {
    private static final long serialVersionUID = 1L;

    // 主表
    /**单据编号*/
    @Excel(name = "单据编号", width = 15)
    @ApiModelProperty(value = "单据编号")
    private String orderNo;
    /**订单类型*/
    @Excel(name = "订单类型", width = 15, dicCode = "mm_purchase_type")
    @Dict(dicCode = "mm_purchase_type")
    @ApiModelProperty(value = "订单类型")
    private String orderType;
    /**供应商*/
    @Excel(name = "供应商", width = 15, dictTable = "mdm_supply", dicText = "supply_full_name", dicCode = "id")
    @Dict(dictTable = "mdm_supply", dicText = "supply_full_name", dicCode = "id")
    @ApiModelProperty(value = "供应商")
    private String supplyId;
    /**订单日期*/
    @Excel(name = "订单日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "订单日期")
    private Date orderDate;
    /**状态*/
    @Excel(name = "状态", width = 15, dicCode = "mm_purchase_status")
    @Dict(dicCode = "mm_purchase_status")
    @ApiModelProperty(value = "状态")
    private String mainStatus;
    /**采购员*/
    @Excel(name = "采购员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "采购员")
    private String buyer;
    /**采购部门*/
    @ApiModelProperty(value = "采购部门")
    @Excel(name = "采购部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    private String buyerDept;
    /**含税金额*/
    @Excel(name = "总金额", width = 15)
    @ApiModelProperty(value = "总金额")
    private java.math.BigDecimal totalPrice;
    /**项目*/
    @Excel(name = "项目", width = 15, dictTable = "quote_project", dicText = "project_name", dicCode = "id")
    @Dict(dictTable = "quote_project", dicText = "project_name", dicCode = "id")
    @ApiModelProperty(value = "项目")
    private String projectId;
    /**实际总额*/
    @Excel(name = "实际总额", width = 15)
    @ApiModelProperty(value = "实际总额")
    private java.math.BigDecimal totalActPrice;
    /**优惠金额*/
    @Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额")
    private java.math.BigDecimal reducePrice;
    /**优惠率%*/
    @Excel(name = "优惠率%", width = 15)
    @ApiModelProperty(value = "优惠率%")
    private java.math.BigDecimal reduceRate;
    /**明细实际金额*/
    @Excel(name = "明细实际金额", width = 15)
    @ApiModelProperty(value = "明细实际金额")
    private java.math.BigDecimal detailActPrice;
    /**明细折扣额*/
    @Excel(name = "明细折扣额", width = 15)
    @ApiModelProperty(value = "明细折扣额")
    private java.math.BigDecimal detailDiscountPrice;

    // 明细表
	/**主键ID*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;
	/**主表ID*/
    @ApiModelProperty(value = "主表ID")
    private String pid;
    /**采购申请明细ID*/
    @ApiModelProperty(value = "采购申请明细ID")
    private String reqDetailId;
	/**行号*/
	@Excel(name = "行号", width = 15)
    @ApiModelProperty(value = "行号")
    private Integer lineNo;
	/**物料*/
	@Excel(name = "物料", width = 15)
    @ApiModelProperty(value = "物料")
    private String materialId;
	/**物料编号*/
	@Excel(name = "物料编号", width = 15)
    @ApiModelProperty(value = "物料编号")
    private String materialNo;
	/**物料描述*/
	@Excel(name = "物料描述", width = 15)
    @ApiModelProperty(value = "物料描述")
    private String materialDesc;
	/**单位*/
	@Excel(name = "单位", width = 15, dictTable = "mdm_unit", dicText = "unit_name", dicCode = "unit_code")
    @Dict(dictTable = "mdm_unit", dicText = "unit_name", dicCode = "unit_code")
    @ApiModelProperty(value = "单位")
    private String unit;
	/**订单数量*/
	@Excel(name = "订单数量", width = 15)
    @ApiModelProperty(value = "订单数量")
    private java.math.BigDecimal purQty;
    /**当前订单的最大数量*/
    @Excel(name = "最大订单数量", width = 15)
    @ApiModelProperty(value = "最大订单数量")
    private java.math.BigDecimal maxPurQty;
	/**入库数量*/
	@Excel(name = "入库数量", width = 15)
    @ApiModelProperty(value = "入库数量")
    private java.math.BigDecimal inQty;
    /**未入库数量*/
    @Excel(name = "未入库数量", width = 15)
    @ApiModelProperty(value = "未入库数量")
    private java.math.BigDecimal handleQty;
	/**含税单价*/
	@Excel(name = "含税单价", width = 15)
    @ApiModelProperty(value = "含税单价")
    private java.math.BigDecimal unitPrice;
	/**含税金额*/
	@Excel(name = "含税金额", width = 15)
    @ApiModelProperty(value = "含税金额")
    private java.math.BigDecimal sumPrice;
	/**税率*/
	@Excel(name = "税率", width = 15)
    @ApiModelProperty(value = "税率")
    private java.math.BigDecimal taxRate;
    /**税额*/
    @Excel(name = "税额", width = 15)
    @ApiModelProperty(value = "税额")
    private java.math.BigDecimal taxPrice;
    /**折扣额*/
    @Excel(name = "折扣额", width = 15)
    @ApiModelProperty(value = "折扣额")
    private java.math.BigDecimal discountPrice;
    /**折扣率%*/
    @Excel(name = "折扣率%", width = 15)
    @ApiModelProperty(value = "折扣率%")
    private java.math.BigDecimal discountRate;
    /**购买金额*/
    @Excel(name = "购买金额", width = 15)
    @ApiModelProperty(value = "购买金额")
    private java.math.BigDecimal actPrice;
	/**交货日期*/
	@Excel(name = "交货日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "交货日期")
    private Date deliveryDate;
	/**库房*/
	@Excel(name = "库房", width = 15)
    @ApiModelProperty(value = "库房")
    private String storageId;
    /**状态*/
    @Excel(name = "状态", width = 15, dicCode = "mm_purchase_status")
    @Dict(dicCode = "mm_purchase_status")
    @ApiModelProperty(value = "状态")
    private String status;
    /**请购单号*/
    @Excel(name = "请购单号", width = 15)
    @ApiModelProperty(value = "请购单号")
    private String reqNo;
    /**请购单行号*/
    @Excel(name = "请购单行号", width = 15)
    @ApiModelProperty(value = "请购单行号")
    private Integer reqLineNo;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**创建人*/
    @Excel(name = "创建人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**修改人*/
    @Excel(name = "修改人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "修改人")
    private String updateBy;
    /**修改时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
    /**创建部门*/
    @ApiModelProperty(value = "创建部门")
    @Excel(name = "创建部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    private String sysOrgCode;
	/**租户ID*/
	@Excel(name = "租户ID", width = 15)
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;
}
